
<%@ page import="minusjudge.Problem" %>
<!DOCTYPE html>
<html>
	<head>
		<meta name="layout" content="main">
		<g:set var="entityName" value="${message(code: 'problem.label', default: 'Problem')}" />
		<title><g:message code="default.show.label" args="[entityName]" /></title>
	</head>
	<body>
		<a href="#show-problem" class="skip" tabindex="-1"><g:message code="default.link.skip.label" default="Skip to content&hellip;"/></a>
		<div class="nav" role="navigation">
			<ul>
				<li><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></li>
				<li><g:link class="list" action="list"><g:message code="default.list.label" args="[entityName]" /></g:link></li>
				<li><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link></li>
			</ul>
		</div>
		<div id="show-problem" class="content scaffold-show" role="main">
			<h1><g:message code="default.show.label" args="[entityName]" /></h1>
			<g:if test="${flash.message}">
			<div class="message" role="status">${flash.message}</div>
			</g:if>
			<ol class="property-list problem">
			
				<g:if test="${problemInstance?.title}">
				<li class="fieldcontain">
					<span id="title-label" class="property-label"><g:message code="problem.title.label" default="Title" /></span>
					
						<span class="property-value" aria-labelledby="title-label"><g:fieldValue bean="${problemInstance}" field="title"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${problemInstance?.memoryLimit}">
				<li class="fieldcontain">
					<span id="memoryLimit-label" class="property-label"><g:message code="problem.memoryLimit.label" default="Memory Limit" /></span>
					
						<span class="property-value" aria-labelledby="memoryLimit-label"><g:fieldValue bean="${problemInstance}" field="memoryLimit"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${problemInstance?.timeLimit}">
				<li class="fieldcontain">
					<span id="timeLimit-label" class="property-label"><g:message code="problem.timeLimit.label" default="Time Limit" /></span>
					
						<span class="property-value" aria-labelledby="timeLimit-label"><g:fieldValue bean="${problemInstance}" field="timeLimit"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${problemInstance?.stackLimit}">
				<li class="fieldcontain">
					<span id="stackLimit-label" class="property-label"><g:message code="problem.stackLimit.label" default="Stack Limit" /></span>
					
						<span class="property-value" aria-labelledby="stackLimit-label"><g:fieldValue bean="${problemInstance}" field="stackLimit"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${problemInstance?.numberOfTest}">
				<li class="fieldcontain">
					<span id="numberOfTest-label" class="property-label"><g:message code="problem.numberOfTest.label" default="Number Of Test" /></span>
					
						<span class="property-value" aria-labelledby="numberOfTest-label"><g:fieldValue bean="${problemInstance}" field="numberOfTest"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${problemInstance?.tipeChecker}">
				<li class="fieldcontain">
					<span id="tipeChecker-label" class="property-label"><g:message code="problem.tipeChecker.label" default="Tipe Checker" /></span>
					
						<span class="property-value" aria-labelledby="tipeChecker-label"><g:fieldValue bean="${problemInstance}" field="tipeChecker"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${problemInstance?.tokenSeparators}">
				<li class="fieldcontain">
					<span id="tokenSeparators-label" class="property-label"><g:message code="problem.tokenSeparators.label" default="Token Separators" /></span>
					
						<span class="property-value" aria-labelledby="tokenSeparators-label"><g:fieldValue bean="${problemInstance}" field="tokenSeparators"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${problemInstance?.statement}">
				<li class="fieldcontain">
					<span id="statement-label" class="property-label"><g:message code="problem.statement.label" default="Statement" /></span>
					
						<span class="property-value" aria-labelledby="statement-label"><g:fieldValue bean="${problemInstance}" field="statement"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${problemInstance?.author}">
				<li class="fieldcontain">
					<span id="author-label" class="property-label"><g:message code="problem.author.label" default="Author" /></span>
					
						<span class="property-value" aria-labelledby="author-label"><g:fieldValue bean="${problemInstance}" field="author"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${problemInstance?.contest}">
				<li class="fieldcontain">
					<span id="contest-label" class="property-label"><g:message code="problem.contest.label" default="Contest" /></span>
					
						<span class="property-value" aria-labelledby="contest-label"><g:link controller="contest" action="show" id="${problemInstance?.contest?.id}">${problemInstance?.contest?.encodeAsHTML()}</g:link></span>
					
				</li>
				</g:if>
			
				<g:if test="${problemInstance?.rootPath}">
				<li class="fieldcontain">
					<span id="rootPath-label" class="property-label"><g:message code="problem.rootPath.label" default="Root Path" /></span>
					
						<span class="property-value" aria-labelledby="rootPath-label"><g:fieldValue bean="${problemInstance}" field="rootPath"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${problemInstance?.solutions}">
				<li class="fieldcontain">
					<span id="solutions-label" class="property-label"><g:message code="problem.solutions.label" default="Solutions" /></span>
					
						<g:each in="${problemInstance.solutions}" var="s">
						<span class="property-value" aria-labelledby="solutions-label"><g:link controller="submission" action="show" id="${s.id}">${s?.encodeAsHTML()}</g:link></span>
						</g:each>
					
				</li>
				</g:if>
			
				<g:if test="${problemInstance?.uploader}">
				<li class="fieldcontain">
					<span id="uploader-label" class="property-label"><g:message code="problem.uploader.label" default="Uploader" /></span>
					
						<span class="property-value" aria-labelledby="uploader-label"><g:link controller="user" action="show" id="${problemInstance?.uploader?.id}">${problemInstance?.uploader?.encodeAsHTML()}</g:link></span>
					
				</li>
				</g:if>
			
			</ol>
			<g:form>
				<fieldset class="buttons">
					<g:hiddenField name="id" value="${problemInstance?.id}" />
					<g:link class="edit" action="edit" id="${problemInstance?.id}"><g:message code="default.button.edit.label" default="Edit" /></g:link>
					<g:actionSubmit class="delete" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" />
				</fieldset>
			</g:form>
		</div>
	</body>
</html>
